package com.dingxin.ship_together_api.config.exception;

import com.dingxin.ship_together_api.entity.enums.ExceptionEnum;
import lombok.Getter;

/**
 * Author: ctj
 * Date: 2022-09-15
 * Time: 11:28
 */
@Getter
public class CustomException extends RuntimeException {

    private Integer code;
    private String msg;

    public CustomException(ExceptionEnum exceptionEnum){
        this.code = exceptionEnum.getCode();
        this.msg = exceptionEnum.getMsg();
    }
}
